package vn.com.fsoft.model.entities;

import javax.persistence.*;

@Entity
@Table(name="TRUSTDISTRICT")
public class Trustdistrict implements java.io.Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1482003553120250699L;
	private int trustdistrictID;
	private String name;
	private String description;
	private Trustregion regionDistrict;
	
	public Trustdistrict(){
		super();
	}
	
	public Trustdistrict(int trustdistrictID, String name, String description,
			Trustregion trustregion) {
		super();
		this.trustdistrictID = trustdistrictID;
		this.name = name;
		this.description = description;
		this.regionDistrict = trustregion;
	}
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="TRUSTDISTRICT_ID",nullable=false,unique=true)
	public int getTrustdistrictID() {
		return trustdistrictID;
	}
	public void setTrustdistrictID(int trustdistrictID) {
		this.trustdistrictID = trustdistrictID;
	}
	@Column(name="NAME",length=50)
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name="DESCRIPTION",length=300)
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="TRUSTREGION_ID",nullable=false)
	public Trustregion getRegionDistrict() {
		return regionDistrict;
	}
	public void setRegionDistrict(Trustregion trustregion) {
		this.regionDistrict = trustregion;
	}
	
}
